package com.tanhua.dubbo.server.api;


import com.tanhua.dubbo.server.enums.HuanXinMessageType;
import com.tanhua.dubbo.server.pojo.HuanXinUser;

public interface HuanXinApi {

    String getToken();

    //注册环信用户
    Boolean register(Long userId);

    //根据用户id查询环信账号信息
    HuanXinUser queryHuanXinUser(Long userId);

    //根据环信用户名查询用户信息
    HuanXinUser queryUserByUserName(String userName);

    //添加好友
    Boolean addUserFriend(Long userId , Long friendId);

    //删除好友
    Boolean removeUserFriend(Long userId,Long friendId);


    /**
     * 以管理员身份发送消息
     * 文档地址：http://docs-im.easemob.com/im/server/basics/messages#%E5%8F%91%E9%80%81%E6%B6%88%E6%81%AF
     *
     * @param targetUserName 发送目标的用户名
     * @param huanXinMessageType 消息类型
     * @param msg
     * @return
     */
    Boolean sendMsgFromAdmin(String targetUserName, HuanXinMessageType huanXinMessageType, String msg);


}
